package com.szp.lagou.dubbo.filerDemo.Context;

import org.apache.dubbo.common.threadlocal.InternalThreadLocal;
import org.apache.dubbo.rpc.RpcContext;

public class IpContext {
    private static InternalThreadLocal<IpContext> IP_CONTEXT = new InternalThreadLocal<IpContext>(){
        protected IpContext initialValue() {
            return new IpContext();
        }
    };

    private String clientIp;

    public static IpContext getContext() {
        return IP_CONTEXT.get();
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }
}
